package cn.test.common;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Title: spring-boot-demo
 * @Package cn.test.common
 * @Date 2018/5/2上午10:44
 * @Author PX ye
 * @E-mail yepx2013@gmail.com
 * @Company http://www.yiautos.com
 * @Description: 这是个有properties映射回来的数据
 */
@Component
public class UserProperties {


    private String name;
    private Integer age;
    private String content;

    public String getName() {
        return name;
    }

    public Integer getAge() {
        return age;
    }

    public String getContent(){
        return content;
    }

    @Value("${cn.test.properties.user.name}")
    public void setName(String name) {
        this.name = name;
    }
    @Value("${cn.test.properties.user.age}")
    public void setAge(Integer age) {
        this.age = age;
    }
    @Value("${cn.test.properties.user.content}")
    public void setContent(String content) {
        this.content = content;
    }
}
